import service from '@/utils/request'
const { httpPost, httpGet } = service
// import qs from 'qs'
// -----------------------------周材结算-内租调用结算接口---------------------//
const request = {
    // 获取内租调用结算数据
    getInternalRentTransferData (params) {
        return httpPost({
            url: '/turnoversettle/internalRentTransferSettle/listByEntity',
            params
        })
    },
    // 新增内租调用
    addInternalRentTransferData (params) {
        return httpPost({
            url: '/turnoversettle/internalRentTransferSettle/create',
            params
        })
    },
    //根据id获取对应数据
    adoptIdObtainInternalRentTransferData (params) {
        return httpGet({
            url: '/turnoversettle/internalRentTransferSettle/findById',
            params
        })
    },
    //根据id查询结算明细
    adoptIdObtainGetSettlementDetailsData (params) {
        return httpGet({
            url: '/turnoversettle/internalRentTransferSettle/getDtlList',
            params
        })
    },
    //根据id查询赔偿明细
    adoptIdObtainGetCompensateDetailedData (params) {
        return httpGet({
            url: '/turnoversettle/internalRentTransferSettle/getCompensateDtl',
            params
        })
    },
    //根据id删除当前数据
    adoptIdObtainDeleteData (params) {
        return httpGet({
            url: '/turnoversettle/internalRentTransferSettle/delete',
            params
        })
    },
    //保存基本数据
    adoptIdObtainKeepData (params) {
        return httpPost({
            url: '/turnoversettle/internalRentTransferSettle/update',
            params
        })
    },
    //保存结算明细
    adoptIdObtainUpdateSettlementDetails (params) {
        return httpPost({
            url: '/turnoversettle/internalRentTransferSettle/updateDtl',
            params
        })
    },
    //保存赔偿明细
    adoptIdObtainUpdateCompensateDetails (params) {
        return httpPost({
            url: '/turnoversettle/internalRentTransferSettle/updateCompensateDtl',
            params
        })
    },
    //初始化红单
    adoptIdInitRed (params) {
        return httpGet({
            url: '/turnoversettle/internalRentTransferSettle/initRed',
            params
        })
    },
    //获取截止上期末累计结算金额
    getPreAmount (params) {
        return httpGet({
            url: '/turnoversettle/internalRentTransferSettle/getPreAmount',
            params
        })
    },

}

export default request